<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

class House extends Model
{
	use HasDateTimeFormatter;
    use SoftDeletes;

    protected $table = 'house';


    public function setHouseConfigAttribute($value)
    {
        $this->attributes['house_config'] = implode(',',$value);
    }

    public function setHouseLabelAttribute($value)
    {
        $this->attributes['house_label'] = implode(',',$value);
    }
    //取出所有房源数据
    public function HouseData()
    {
        $houseData = self::all();
        return $houseData;

    }

}
